package com.txby.platformCore.data;

import java.util.HashMap;

import lombok.Data;

public class CommonXGRetunInfo extends HashMap<String, Object> {
	public  int ret_code ;//返回码 0成功
	public String err_msg;
	public  String result ;
	 
	/**
	 * @return the ret_code
	 */
	public int getRet_code() {
		return super.get("ret_code") == null ? ret_code : Integer.parseInt(super.get("ret_code").toString());
	}

	/**
	 * @param ret_code the ret_code to set
	 */
	public void setRet_code(int ret_code) {
		put("ret_code", ret_code);
		this.ret_code = ret_code;
	}

	/**
	 * @return the err_msg
	 */
	public String getErr_msg() {
		return  super.get("err_msg") == null ? err_msg : super.get("err_msg").toString();
	}

	/**
	 * @param err_msg the err_msg to set
	 */
	public void setErr_msg(String err_msg) {
		put("err_msg", err_msg);
		this.err_msg = err_msg;
	}

	/**
	 * @return the result
	 */
	public String getResult() {
		return  super.get("result") == null ? result : super.get("result").toString();
	}

	/**
	 * @param result the result to set
	 */
	public void setResult(String result) {
		put("result", result);
		this.result = result;
	}

	public CommonXGRetunInfo() {
	}

	 
	
	public static CommonXGRetunInfo resultMessage(int ret_code,String err_msg,String  result ) {
		CommonXGRetunInfo r=new CommonXGRetunInfo();
		r.setResult(result);
		r.setRet_code(ret_code);
		r.setErr_msg(err_msg);
		return r;
	}

}
